import Vue from 'vue'
import VueRouter from 'vue-router'
import Photo from '../views/tabbar/Photo.vue'
import Info from '../views/tabbar/Info.vue'
import Home from '../views/tabbar/Home.vue'
import List from '../views/goods/List.vue'
import Detail from '../views/goods/Detail.vue'
import Goodsdesc from '../views/goods/Goodsdesc.vue'
import Goodscomments from '../views/goods/Goodscomments.vue'
import Shopcar from '../views/shopcar/Shopcar.vue'
import Search from '../views/serarch/Search.vue'
import Addgoods from '../views/serarch/addgoods/Addgoods.vue'
import Contact from '../views/serarch/Contact.vue'
import NewsList from '../views/NewsList.vue'
import xq from '../views/details/xq.vue'
import HuiYuan from '../views/tabbar/huiYuan/HuiYuan.vue'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/Photo/list',
    component: Photo
  },
  {
    path: '/home',
    component: Home
  },
  // 商品购买列表页面
  {
    path: '/goods/list',
    component: List
  },
  // 商品详情页
  {
    path: '/goods/detail/:id',
    component: Detail
  },
  // 图文介绍页
  {
    path: '/goodsdesc/:id',
    component: Goodsdesc
  },
  // 商品评论页
  {
    path: '/goodscomments/:id',
    component: Goodscomments
  },
  // 购物车
  {
    path: '/shopcar',
    component: Shopcar
  },
  {
    path: '/Photo/Info/:id',
    component: Info
  },
  {
    path: '/search',
    component: Search
  },
  {
    path: '/addgoods',
    component: Addgoods
  },
  {
    path: '/newslist',
    component: NewsList
  },
  {
    path: '/details/:id',
    component: xq
  },
  {
    path: '/contact',
    component: Contact
  },
  {
    path: '/member',
    component: HuiYuan
  }
]

const router = new VueRouter({
  routes
})

export default router
